/*
 * 
 */
package org.demo.filemanager;

import org.boxlayout.gui.widget.TreeBrowsable;



/**
 * TODO: Edit class comment
 * @author dodekane@gmail.com
 */
public class Selector {
    TreeBrowsable selected;
    
    public void select(TreeBrowsable selected){
        if(this.selected!=null){
            this.selected.setSelected(false);
        }
        selected.setSelected(true);
        this.selected=selected;
    }
    
    public TreeBrowsable getSelected(){
        return selected;
    }
    
    public void clear(){
        if(selected!=null){
            selected.setSelected(false);
        }
        selected = null;
    }
}
